// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.1
import "../../Components"

AndroidAppItem{
    id: _root
    width: parent.width
    height: 120 * viewScale

    signal clicked(variant mouse)

    gradient: Gradient{
        GradientStop{ position: 0; color: "#00000088" }
        GradientStop{ position: 1; color: "#00000000" }
    }

    Image{
        id: _border
        anchors.centerIn: parent
        anchors.topMargin: 2
        width: 698 * viewScale
        height: 98 * viewScale
        source: "images/ComGoogleAndroidGooglequicksearchbox_widget.png"
        //googleマーク
        Image{
            id: _logo
            anchors.verticalCenter: parent.verticalCenter
            x: 40 * _root.viewScale
            width: 132 * _root.viewScale
            height: 64 * _root.viewScale
            source: "images/ComGoogleAndroidGooglequicksearchbox_widget_logo.png"
        }
        MouseArea{
            id: _mouseArea
            anchors.fill: parent
            onClicked: {
                _root.clicked(mouse);
            }
        }

        //マイクのマーク
        ImageButton{
            anchors.verticalCenter: parent.verticalCenter
            x: 610 * _root.viewScale
            width: 64 * _root.viewScale
            height: 64 * _root.viewScale
            imageIdle: "../Android/Applications/images/ComGoogleAndroidGooglequicksearchbox_widget_logo_microphone.png"
            imagePress: "../Android/Applications/images/ComGoogleAndroidGooglequicksearchbox_widget_logo_microphone_pressed.png"
        }

        states: [
            State{
                name: "pressed"
                when: _mouseArea.pressed
                PropertyChanges {
                    target: _logo
                    source: "images/ComGoogleAndroidGooglequicksearchbox_widget_logo_pressed.png"
                }
            }
        ]
    }
}
